<?php
  ob_start();
  
?>


<img src="<?php echo $this->exturl.'thumb/'.$this->produkt['foto'][0]['zdjecie']; ?>" alt="foto" />
	
	<div id="opis">
		<a href="<?php echo $this->exturl.'Produkty/'.$this->produkt['url'].','.$this->produkt['id']; ?>" class="link-logo top"></a>
		
		<ul>
			<li><span class="nazwa"><?php echo $this->produkt['producent'].' '.$this->produkt['nazwa'].' '.$this->produkt['podnazwa']; ?></span></li>
					
	<?php
			if ($this->produkt['cena_promocja'] != 0){
	?>
			
			<li><span class="cena-old"><?php echo $this->produkt['cena']; ?></span> <span class="cena"><?php echo $this->produkt['cena_promocja']; ?>zł</span></li>
			
	<?php
			}else{
	?>
			<li><span class="cena"><?php echo $this->produkt['cena']; ?>zł </span></li>
			
	<?php
			}
	?>
			
	<?php		
			if ($this->produkt['rabatArr'] != ''){
	?>
				<li><span class="cena">Rabat <?php echo $this->produkt['rabatArr'][1]; ?>% </span></li>
				<li><span class="small">(przy zamówieniu min. <?php echo $this->produkt['rabatArr'][0]; ?> szt.)</span></li>
				
	<?php
			}
	?>
			
			<li><img src="<?php echo $this->siteurl; ?>www/gfx/fbsharebutton.jpg" alt="share" id="fbsharebutton"/></li>
		</ul>
		
		<script type="text/javascript">
				$('#fbsharebutton').click(function(e){
				e.preventDefault();
				FB.ui(
					{
					method: 'feed',
					name: 'Moulin Rouge - <?php echo $this->produkt['producent'].' '.$this->produkt['nazwa'].' '.$this->produkt['podnazwa']; ?>',
					link: '<?php echo $this->exturl.'Produkty/'.$this->produkt['url'].','.$this->produkt['id']; ?>',
					picture: '<?php echo $this->exturl.'thumb/'.$this->produkt['foto'][0]['thumb']; ?>',
					caption: 'Moulin Rouge - <?php echo $this->produkt['producent'].' '.$this->produkt['nazwa'].' '.$this->produkt['podnazwa']; ?>',
					description: '',
					message: ''
					});
				});
		</script>
	</div>
<?php
	
	$data['html'] = ob_get_contents();
	
	ob_clean();
	
	echo json_encode($data);
	
	ob_end_flush();

?>